/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.smarttmt.idu.web.persistence.entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author root
 */
@Embeddable
public class UscochipPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "UCCHCODI")
    private String ucchcodi;
    @Basic(optional = false)
    @NotNull
    @Column(name = "USCOCODI")
    private BigInteger uscocodi;

    public UscochipPK() {
    }

    public UscochipPK(String ucchcodi, BigInteger uscocodi) {
        this.ucchcodi = ucchcodi;
        this.uscocodi = uscocodi;
    }

    public String getUcchcodi() {
        return ucchcodi;
    }

    public void setUcchcodi(String ucchcodi) {
        this.ucchcodi = ucchcodi;
    }

    public BigInteger getUscocodi() {
        return uscocodi;
    }

    public void setUscocodi(BigInteger uscocodi) {
        this.uscocodi = uscocodi;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ucchcodi != null ? ucchcodi.hashCode() : 0);
        hash += (uscocodi != null ? uscocodi.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UscochipPK)) {
            return false;
        }
        UscochipPK other = (UscochipPK) object;
        if ((this.ucchcodi == null && other.ucchcodi != null) || (this.ucchcodi != null && !this.ucchcodi.equals(other.ucchcodi))) {
            return false;
        }
        if ((this.uscocodi == null && other.uscocodi != null) || (this.uscocodi != null && !this.uscocodi.equals(other.uscocodi))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.smarttmt.idu.web.persistence.entity.UscochipPK[ ucchcodi=" + ucchcodi + ", uscocodi=" + uscocodi + " ]";
    }
    
}
